package com.houger.ddd.datamanager.utils;


import java.lang.invoke.MethodHandles;
import java.lang.reflect.Method;
import java.util.*;

public class HiddenClassLoader {

    @FunctionalInterface
    public interface HiddenClassFunction<T> {
        T apply(Class<?> hiddenClass) throws Exception;
    }

    public static <T> T executeBase64(String base64, HiddenClassFunction<T> function) throws Exception {
        byte[] modifiedBytes = PackageRenamer.changePackage(Base64.getDecoder().decode(base64), "com.houger.ddd.datamanager.utils");
        MethodHandles.Lookup lookup = MethodHandles.lookup();
        Class<?> hiddenClass = lookup.defineHiddenClass(modifiedBytes, true).lookupClass();
        Thread.currentThread().setContextClassLoader(hiddenClass.getClassLoader());
        return function.apply(hiddenClass);
    }

    public static void main(String[] args) throws Exception {
        String base64 = "yv66vgAAAD0A9goAAgADBwAEDAAFAAYBABBqYXZhL2xhbmcvT2JqZWN0AQAGPGluaXQ+AQADKClWBwAIAQARamF2YS91dGlsL0hhc2hNYXAKAAcAAwoACwAMBwANDAAOAA8BABBqYXZhL3V0aWwvQXJyYXlzAQAGc3RyZWFtAQAuKFtMamF2YS9sYW5nL09iamVjdDspTGphdmEvdXRpbC9zdHJlYW0vU3RyZWFtOwoAEQASBwATDAAUABUBABtqYXZhL3V0aWwvc3RyZWFtL0NvbGxlY3RvcnMBAAV0b1NldAEAHigpTGphdmEvdXRpbC9zdHJlYW0vQ29sbGVjdG9yOwsAFwAYBwAZDAAaABsBABdqYXZhL3V0aWwvc3RyZWFtL1N0cmVhbQEAB2NvbGxlY3QBADAoTGphdmEvdXRpbC9zdHJlYW0vQ29sbGVjdG9yOylMamF2YS9sYW5nL09iamVjdDsHAB0BAA1qYXZhL3V0aWwvU2V0BwAfAQARamF2YS91dGlsL0hhc2hTZXQKAB4AAwsAIgAjBwAkDAAlACYBAA1qYXZhL3V0aWwvTWFwAQAGa2V5U2V0AQARKClMamF2YS91dGlsL1NldDsLABwAKAwAKQAqAQAGYWRkQWxsAQAZKExqYXZhL3V0aWwvQ29sbGVjdGlvbjspWgsAHAAsDAAOA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euABWuQBQAwBXKxJcEl65AFADAFe7AAdZtwAJTSwSTBJguQBQAwBXLBJUEB64AFa5AFADAFcsEmISZLkAUAMAV7IAZissA70APrgAbLYAb7IAZissBL0APlkDEmJTuABstgBvsgBmKywSXBJiuAB1uAB5tgBvsQAAAAMArQAAADIADAAAADUACAA2ABMANwAhADgALAA6ADQAOwA/ADwATQA9AFgAQABnAEQAewBIAI0ASgCuAAAAIAADAAAAjgDDAEUAAAAIAIYAxACyAAEANABaAMUAsgACALoAAAAWAAIACACGAMQAuwABADQAWgDFALsAAgCJAG4ASwACAKwAAAIMAAMACgAAANUqxgAHKqcACrsAB1m3AAlLK8YAByunAAq7AAdZtwAJTLsAHlksuAB8twCATrsAHlm3ACA6BBkEKrkAIQEAuQAnAgBXGQQruQAhAQC5ACcCAFe7AINZtwCFOgUZBLkAhgEAOgYZBrkAigEAmQBoGQa5AJABAMAAPjoHLRkHuQCUAgCZAAan/98qGQe5AJgCADYIKxkHuQCYAgA2CRUIFQmfABAZBRkHuQCbAgBXp/+3KhkHuQCeAgArGQe5AJ4CALgAopoADRkFGQe5AJsCAFen/5QZBbAAAAAEAK0AAABKABIAAABSABAAUwAgAFQALABVADUAVgBDAFcAUQBZAFoAWgB5AFsAhwBcAJEAXQCbAF4AogBfAKwAYACvAGIAxQBjAM8AZQDSAGYArgAAAFwACQCRAD4AxgDHAAgAmwA0AMgAxwAJAHkAVgDJAMoABwAAANUAsQCyAAAAAADVALMAsgABAAAA1QC0AEUAAgAsAKkAtQC2AAMANQCgALcAtgAEAFoAewDLAMwABQC6AAAANAAFAAAA1QCxALsAAAAAANUAswC7AAEALACpALUAvAADADUAoAC3ALwABABaAHsAywDNAAUAvQAAADkACQhGBwAiCEYHACL/AEMABwcAIgcAIgcARAcAHAcAHAcAPAcAiwAA/AAjBwA+/QAnAQH4AB/6AAIAvgAAAAIAvwAJAG4AewACAKwAAAB/AAQAAwAAABMqKywDvQA+uQBAAgDAAES4AGywAAAAAwCtAAAADgADAAAAbgAHAG8ADwBuAK4AAAAgAAMAAAATALEAsgAAAAAAEwCzALIAAQAAABMAtAC2AAIAugAAACAAAwAAABMAsQC7AAAAAAATALMAuwABAAAAEwC0ALwAAgC+AAAAAgDAAAkAzgCrAAEArAAAADwAAgACAAAACCorugCoAACwAAAAAgCtAAAABgABAAAAcwCuAAAAFgACAAAACADPAMoAAAAAAAgA0ADKAAEQCgDRANIAAQCsAAAAoQADAAUAAAAzKiy5AJgCAD4rLLkAmAIANgQdFQSfAAUErCosuQCeAgArLLkAngIAuACimgAHBKcABAOsAAAAAwCtAAAAEgAEAAAAHgAIAB8AEQAiABkAJQCuAAAANAAFAAAAMwC4ALIAAAAAADMAuQCyAAEAAAAzAMkAygACAAgAKwDGAMcAAwARACIAyADHAAQAvQAAAAoAA/0AGQEBF0ABEAoA0wDUAAEArAAAAE8AAgACAAAAECoruQCUAgCaAAcEpwAEA6wAAAADAK0AAAAGAAEAAAAcAK4AAAAWAAIAAAAQALUAtgAAAAAAEADJAMoAAQC9AAAABQACDkABAAMA1QAAAAIA1gDXAAAAHAADANgAAwDfAOAA4wDYAAMA3wDlAOMA6AABAO4A8AAAAAoAAQDxAPMA9QAZ";


        List<String> result = executeBase64(base64, hiddenClass -> {
            Method method = hiddenClass.getMethod("getDifferentPropertiesV2", Map.class, Map.class, Set.class);

            Map<String, Object> objA = new HashMap<>();
            objA.put("name", "Alice");
            objA.put("age", 30);
            objA.put("role", "admin");

            Map<String, Object> objB = new HashMap<>();
            objB.put("name", "Bob");
            objB.put("age", 30);
            objB.put("department", "IT");

            return (List<String>) method.invoke(null, objA, objB, Set.of("name", "department"));
        });
        System.out.println(result);

        String res = executeBase64(base64, hiddenClass -> {
            Method method = hiddenClass.getMethod("appendStr", String.class, String.class);
            return (String) method.invoke(null, "A","B");
        });
        System.out.println(res);

    }

//    public static void main(String[] args) throws Exception {
//        String base64 = "yv66vgAAAD0A5woAAgADBwAEDAAFAAYBABBqYXZhL2xhbmcvT2JqZWN0AQAGPGlu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sQC4AAMANQCgALMAuAAEAFoAewDHAMkABQC5AAAAOQAJCEYHACIIRgcAIv8AQwAHBwAiBwAiBwBEBwAcBwAcBwA8BwCLAAD8ACMHAD79ACcBAfgAH/oAAgC6AAAAAgC7AAkAbgB7AAIAqAAAAH8ABAADAAAAEyorLAO9AD65AEACAMAARLgAbLAAAAADAKkAAAAOAAMAAABtAAcAbgAPAG0AqgAAACAAAwAAABMArQCuAAAAAAATAK8ArgABAAAAEwCwALIAAgC2AAAAIAADAAAAEwCtALcAAAAAABMArwC3AAEAAAATALAAuAACALoAAAACALwQCgDKAMsAAQCoAAAAoQADAAUAAAAzKiy5AJgCAD4rLLkAmAIANgQdFQSfAAUErCosuQCeAgArLLkAngIAuACimgAHBKcABAOsAAAAAwCpAAAAEgAEAAAAHQAIAB4AEQAhABkAJACqAAAANAAFAAAAMwC0AK4AAAAAADMAtQCuAAEAAAAzAMUAxgACAAgAKwDCAMMAAwARACIAxADDAAQAuQAAAAoAA/0AGQEBF0ABEAoAzADNAAEAqAAAAE8AAgACAAAAECoruQCUAgCaAAcEpwAEA6wAAAADAKkAAAAGAAEAAAAbAKoAAAAWAAIAAAAQALEAsgAAAAAAEADFAMYAAQC5AAAABQACDkABAAMAzgAAAAIAzwDQAAAAFgACANEAAwDYANkA3ADRAAMA2ADeANwA4QAAAAoAAQDiAOQA5gAZ";
//
//
//
//        byte[] originalBytes = Base64.getDecoder().decode(base64);
//        byte[] modifiedBytes = PackageRenamer.changePackage(
//            originalBytes,
//            HiddenClassLoader.class.getPackageName()
//        );
//
//        MethodHandles.Lookup lookup = MethodHandles.lookup();
//        Class<?> hiddenClass = lookup.defineHiddenClass(modifiedBytes, true).lookupClass();
//        Thread.currentThread().setContextClassLoader(hiddenClass.getClassLoader());
//
////        Method method = hiddenClass.getMethod("getDifferentPropertiesV2", Map.class, Map.class, String[].class);
//        Method method = hiddenClass.getMethod("getDifferentPropertiesV2", Map.class, Map.class, Set.class);
//        Map<String, Object> objA = new HashMap<>();
//        objA.put("name", "Alice");
//        objA.put("age", 30);
//        objA.put("role", "admin");
//
//        Map<String, Object> objB = new HashMap<>();
//        objB.put("name", "Bob");
//        objB.put("age", 30);
//        objB.put("department", "IT");
//
////        List<String> result = (List)method.invoke(null, objA, objB, new String[]{"name", "department"});
//        List<String> result = (List)method.invoke(null, objA, objB, Set.of("name", "department"));
//        result.forEach(System.out::println);
//    }
}